package study.chapter03.thread;

public class TestThread3 {
    public static void main(String[] args) {

        //使用lambda表达式
        new Thread(() -> {
            for (int i = 0; i < 5; i++) {
                System.out.println("线程：A" + ", i = " + i);
            }
        }, "A").start();

        new Thread(() -> {
            for (int i = 0; i < 5; i++) {
                System.out.println("线程：B" + ", i = " + i);
            }
        }, "B").start();

        new Thread(() -> {
            for (int i = 0; i < 5; i++) {
                System.out.println("线程：C" + ", i = " + i);
            }
        }, "C").start();
    }
}
